package com.jic.syncdata.utils;

import java.util.*;

/**
 * Desc:
 *
 * @author wulei19922@gmail.com
 * create:2020/12/1
 **/
public class LoadConfig {


//    public static void main(String[] args) {
//
//        Map t_pm_user = loadConfig("t_pm_user");
//
//        System.out.println(t_pm_user.size());
//    }
    
    
    public static Map  load(String filename){
        Locale locale1 = new Locale("zh", "CN");
        ResourceBundle resb1 = ResourceBundle.getBundle(filename, locale1);


        Enumeration<String> keys = resb1.getKeys();

        Map<String,String> coninfp=new HashMap<>();
        while (keys.hasMoreElements()){
                String str=keys.nextElement();
//            System.out.println(keys.nextElement());

//            System.out.println(str);
                coninfp.put(str,resb1.getString(str));
            
        }
        

        return coninfp;

    }
    
}
